<template>
	<el-menu
		@open="openHerf"
		@select="openHerf"
		default-active="vue"
		class="el-menu-vertical-demo"
		background-color="#545c64"
		text-color="#fff"
		active-text-color="#ffd04b"
	>
		<el-submenu index="Html">
			<template slot="title">
				<i class="el-icon-location"></i>
				<span>vue2.0</span>
			</template>
			<el-menu-item-group>
				<template slot="title">基础</template>
				<el-menu-item index="zhiLing">指令</el-menu-item>
				<el-menu-item index="shengming">生命周期</el-menu-item>
			</el-menu-item-group>
		</el-submenu>
		<el-menu-item index="jquery">
			<i class="el-icon-menu"></i>
			<span slot="title">jQuery</span>
		</el-menu-item>
		<el-menu-item index="xzq">
			<i class="el-icon-document"></i>
			<span slot="title">选择器</span>
		</el-menu-item>
		<el-menu-item index="dh">
			<i class="el-icon-setting"></i>
			<span slot="title">动画</span>
		</el-menu-item>
	</el-menu>
</template>

<script>
export default {
	methods: {
		openHerf(index) {
			window.location.hash = index
		},
	},
}
</script>